package com.tarena.lbs.coupon.pojo.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;


@Data
@TableName("coupon")
public class CouponPO implements Serializable {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField(value = "coupon_name")
    private String couponName;

    @TableField(value = "coupon_type")
    private Integer couponType;

    @TableField(value = "discount_value")
    private BigDecimal discountValue;

    @TableField(value = "max_discount_amount")
    private BigDecimal maxDiscountAmount;

    @TableField(value = "applicable")
    private String applicable;

    @TableField(value = "usage_limit")
    private Integer usageLimit;

    @TableField(value = "max_usage_limit")
    private Integer maxUsageLimit;

    @TableField(value = "start_date")
    @Schema(description  = "开始时间",example = "2023-01-01 01:01:01")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date startDate;

    @TableField(value = "end_date")
    @Schema(description  = "结束时间",example = "2023-01-01 01:01:01")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date endDate;

    @TableField(value = "status")
    private Integer status;

    @TableField(value = "describes")
    private String describes;

    @TableField(value = "business_id")
    private Integer businessId;

    @TableField(value = "create_at")
    private Date createAt;

    @TableField(value = "update_at")
    private Date updateAt;

    @TableField(value = "usage_num")
    private Integer usageNum;

    @TableField(value = "enable_status")
    private Integer enableStatus;

    @TableField(value = "exclusion_type")
    private Integer exclusionType;

    @TableField(value = "order_amount")
    private BigDecimal orderAmount;
}